-- GENERATED SPELL FOR [Spirestone Warlord] --


function spell0_9216(pUnit, Event) --@Empower Will,Self--
pUnit:FullCastSpellOnTarget(16171,pUnit)
pUnit:RegisterEvent('Sorts_9216', 586, 1)
end

function spell1_9216(pUnit, Event) --@Frenzy,Self--
pUnit:FullCastSpellOnTarget(8269,pUnit)
pUnit:RegisterEvent('Sorts_9216', 639, 1)
end

function Sorts_9216(pUnit, Event)
local choix_sorts_9216 = math.random(0, 1)
if choix_sorts_9216 == 0 then
pUnit:RegisterEvent('spell0_9216', 1, 1)
end
if choix_sorts_9216 == 1 then
pUnit:RegisterEvent('spell1_9216', 1, 1)
end
end

function mob9216_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_9216', math.random(1500, 3000), 1)
end

function mob9216_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob9216_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob9216_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(9216, 1, 'mob9216_Action')
RegisterUnitEvent(9216, 2, 'mob9216_Leave')
RegisterUnitEvent(9216, 3, 'mob9216_Kill')
RegisterUnitEvent(9216, 4, 'mob9216_Die')
